USE [[databasename]]
GO

SET NOCOUNT ON
-- Clearing statements

DELETE FROM [MessageType] WHERE [MessageTypeId] in (9006, 9005, 9007, 9009, 9011, 9012, 9013, 9014, 9015, 9010, 9008, 9018)
GO

DELETE FROM [ServiceProviderTypeMessageType] WHERE [sourceServiceProviderTypeID] IN (117,118) OR [destinationServiceProviderTypeID] in (117,118)
GO

DELETE FROM [ServiceProviderPool] WHERE [serviceProviderID] = '117'
DELETE FROM [ServiceProviderPool] WHERE [serviceProviderID] = '118'
GO

DELETE FROM [ServiceProvider] WHERE [serviceProviderID] = '117'
GO

DELETE FROM [PoolServiceProviderType] WHERE [serviceProviderTypeID] in (117,118) AND [poolID] = 1
GO

DELETE FROM [ServiceProviderType] WHERE [serviceProviderTypeID] in (117,118)
GO

SET NOCOUNT OFF
GO

--INSERTs generated by 'sp_generate_inserts' stored procedure written by Vyas
--Build number: 22
--Problems/Suggestions? Contact Vyas @ vyaskn@hotmail.com
--http://vyaskn.tripod.com
 
SET NOCOUNT ON
 
SET IDENTITY_INSERT [dbo].[ServiceProviderType] ON
GO
 
 
PRINT 'Inserting values into [ServiceProviderType]'

INSERT INTO [ServiceProviderType] ([serviceProviderTypeID],[displayName],[serviceProviderTypeCode],[lockedUserID],[lockedDate],[status])VALUES(117,'Patient Register','PTREG',NULL,NULL,0)
INSERT INTO [ServiceProviderType] ([serviceProviderTypeID],[displayName],[serviceProviderTypeCode],[lockedUserID],[lockedDate],[status])VALUES(118,'Patient Register Client','PTREGC',NULL,NULL,0)
PRINT 'Done'
 
 
SET IDENTITY_INSERT [dbo].[ServiceProviderType] OFF
GO
SET NOCOUNT OFF
GO

SET NOCOUNT ON
GO
 
PRINT 'Inserting values into [ServiceProvider]'

INSERT INTO [ServiceProvider] ([serviceProviderID],[displayName],[serviceProviderTypeID],[systemName],[publicKey],[webServiceURL],[interactiveSessionURI],[interactiveSessionTypeID],[adminContactName],[adminContactAddress1],[adminContactAddress2],[adminContactCity],[adminContactProvince],[adminContactPostalCode],[adminContactCountry],[adminContactPhone],[adminContactFax],[adminContactEmail],[encryptionType],[LockedUserID],[LockedDate],[status])VALUES('117','Patient Register',117,'Patient Register','[prpublickey]','http://[prhost]/[prwssite]/PatientRegisterWS.asmx',NULL,NULL,'John Tranter','Simpl House - Level 3','666 Great South Road - Penrose','Auckland','','1000','NZ','','','john.tranter@simpl.co.nz','TripleDES',NULL,NULL,0)
PRINT 'Done'
 
 
SET NOCOUNT OFF
GO

--INSERTs generated by 'sp_generate_inserts' stored procedure written by Vyas
--Build number: 22
--Problems/Suggestions? Contact Vyas @ vyaskn@hotmail.com
--http://vyaskn.tripod.com
 
SET NOCOUNT ON
 
 
PRINT 'Inserting values into [ServiceProviderPool]'

INSERT INTO [ServiceProviderPool] ([serviceProviderID],[poolID])VALUES('117',1)
PRINT 'Done'
 
 
SET NOCOUNT OFF

GO

--INSERTs generated by 'sp_generate_inserts' stored procedure written by Vyas
--Build number: 22
--Problems/Suggestions? Contact Vyas @ vyaskn@hotmail.com
--http://vyaskn.tripod.com
 
SET NOCOUNT ON
 
 
PRINT 'Inserting values into [PoolServiceProviderType]'

INSERT INTO [PoolServiceProviderType] ([serviceProviderTypeID],[poolID])VALUES(117,1)
INSERT INTO [PoolServiceProviderType] ([serviceProviderTypeID],[poolID])VALUES(118,1)
PRINT 'Done'
 
 
SET NOCOUNT OFF

GO

--INSERTs generated by 'sp_generate_inserts' stored procedure written by Vyas
--Build number: 22
--Problems/Suggestions? Contact Vyas @ vyaskn@hotmail.com
--http://vyaskn.tripod.com
 
SET NOCOUNT ON
 
SET IDENTITY_INSERT [dbo].[MessageType] ON
GO
 
 
PRINT 'Inserting values into [MessageType]'

INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9005,'Patient Register Patient Insert','http://[prhost]/[prwssite]/Schemas/PatientRequest.xsd','1.0',NULL,NULL,1)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9006,'Patient Update','http://[prhost]/[prwssite]/Schemas/PatientRequest.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9007,'Patient Search','http://[prhost]/[prwssite]/Schemas/PatientSearch.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9008,'Patient Search Result','http://[prhost]/[prwssite]/Schemas/Patients.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9009,'Patient Select','http://[prhost]/[prwssite]/Schemas/PatientIDRequest.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9010,'Patient Select Result','http://[prhost]/[prwssite]/Schemas/Patient.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9011,'Patient Lock','http://[prhost]/[prwssite]/Schemas/PatientIDRequest.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9012,'Patient Unlock','http://[prhost]/[prwssite]/Schemas/PatientIDRequest.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9013,'Patient Unlock All','http://[prhost]/[prwssite]/Schemas/PatientIDRequest.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9014,'Patient Update Result','http://[prhost]/[prwssite]/Schemas/Patient.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9015,'Patient Insert Result','http://[prhost]/[prwssite]/Schemas/Patient.xsd','1.0',NULL,NULL,0)
INSERT INTO [MessageType] ([messageTypeID],[description],[xmlSchema],[version],[lockedUserID],[lockedDate],[status])VALUES(9018,'Patient Search Result2','http://[prhost]/[prwssite]/Schemas/Patients.xsd','1234567890',NULL,NULL,0)
PRINT 'Done'
 
 
SET IDENTITY_INSERT [dbo].[MessageType] OFF
GO
SET NOCOUNT OFF

GO

--INSERTs generated by 'sp_generate_inserts' stored procedure written by Vyas
--Build number: 22
--Problems/Suggestions? Contact Vyas @ vyaskn@hotmail.com
--http://vyaskn.tripod.com
 
SET NOCOUNT ON
 
SET IDENTITY_INSERT [dbo].[ServiceProviderTypeMessageType] ON
GO
 
 
PRINT 'Inserting values into [ServiceProviderTypeMessageType]'

INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(234,1000,117,101)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(235,1000,118,101)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(236,1001,101,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(241,1001,101,118)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(238,1002,117,101)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(239,1002,118,101)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(240,1003,101,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(237,1003,101,118)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(242,2000,117,101)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(243,2000,118,101)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(224,9006,118,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(225,9007,118,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(232,9008,117,118)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(226,9009,118,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(231,9010,117,118)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(227,9011,118,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(228,9012,118,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(229,9013,118,117)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(233,9014,117,118)
INSERT INTO [ServiceProviderTypeMessageType] ([serviceProviderTypeMessageTypeID],[messageTypeID],[sourceServiceProviderTypeID],[destinationServiceProviderTypeID])VALUES(230,9015,117,118)
PRINT 'Done'
 
 
SET IDENTITY_INSERT [dbo].[ServiceProviderTypeMessageType] OFF
GO
SET NOCOUNT OFF

